package com.demo.bookstore.bean;

import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author ddone
 * @date 2024/3/16-10:35
 */
@Data
public class Cart {
    private int id;

    private int totalCount ;
    private double totalAmount ;
    /**
     * 里面存 bookId和书的相关信息 包括 数量,价格等
     */
    private Map<Integer,CartItem> itemMap = new HashMap<>();
    private List<CartItem> itemList = new ArrayList<>();
}
